<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>{label_webpage_title}</title>
  <style type="text/css">
    body, td {
      font-family: sans-serif;
      font-weight: normal;
      font-size: 9pt;
      background-color: #fff;
    }
    .borderdiv {
      width: 524pt;
      height: 668pt;
      padding: 0;
      border-style: solid;
      border-width: 1px;
      border-color: #000000;
    }
    .paddingdiv {
      padding: 10pt;
    }
    .bigtable{
      padding: 0px;
      border-spacing: 0;
      border-collapse: collapse;
    }
    .bigtable, .linetable {
      width: 504pt;
    }
    .linetable {
      margin: 11pt 0 0 0;
      padding: 0px;
      border-spacing: 0;
      border-collapse: collapse;
    }
    .mainhead {
      font-weight: bold;
      font-size: 14pt;
      text-align: left;
    }
    .subhead {
      font-weight: bold;
      font-size: 8pt;
    }
    .under {
      border-style: solid;
      border-width: 0 0 1px 0;
      border-color: #999999;
    }
    .ftitletable {
      width: 100%;
      margin: 0 0 0 0;
    }
    .ftitlecell1 {
      width: 33%;
      vertical-align: top;
      text-align: left;
      font-size: 14pt;
      font-weight: bold;
    }
    .ftitlecell2 {
      width: 33%;
      vertical-align: top;
      text-align: right;
      font-size: 9pt;
    }
    .ftitlecellm {
      width: 34%;
      vertical-align: top;
      text-align: center;
      font-size: 14pt;
      font-weight: bold;
    }
    hr {
      border: 0;
      height: 6pt;
      color: #999999;
      background-color: #999999;
      margin: 12pt 0 12pt 0;
    }
    .tdLabelContainer {
      text-align: right;
      width: 10%;
      vertical-align: top;
      white-space: nowrap;
    }
    .mainhead {
      vertical-align: top;
    }
  </style>
</head>

<body>

<!-- The double div resolves a difference between Firefox and IE in treatment of padding. -->
<div class='borderdiv'><div class='paddingdiv'>

 <table class="bigtable">
  <tr>
   <td class='mainhead' style="vertical-align:top">
    {header1}
    <span class='subhead'>{label_subhead_clinic}</span>
   </td>
   <td style="text-align:right;width:10%;white-space:nowrap">
    <table border='1' style="padding:2px;border-spacing:0;border-collapse:collapse">
     <!--
     <tr>
      <td style="white-space:nowrap">{label_clinic_id}</td>
      <td style='width:60pt;white-space:nowrap'>{fac_facility_npi}</td>
     </tr>
     -->
     <tr>
      <td style="white-space:nowrap">{label_client_id}</td>
      <td style="white-space:nowrap">{pt_pubpid}&nbsp;</td>
     </tr>
     <!--
     <tr>
      <td style="white-space:nowrap">{label_control_no}</td>
      <td style="white-space:nowrap">{ref_id}</td>
     </tr>
     -->
     <tr>
      <td style="white-space:nowrap">{label_date}</td>
      <td style="white-space:nowrap;min-width:54pt">{ref_refer_date}&nbsp;</td>
     </tr>
    </table>
   </td>
  </tr>
 </table>

 <br />&nbsp;<br />{label_history_summary}:

 <table cellspacing='0' cellpadding='0' class='linetable'>
  <tr>
   <td width='1%' nowrap>{label_bp} &nbsp;</td>
   <td class='under'>{v_bps}/{v_bpd}&nbsp;</td>
   <td width='1%' nowrap>&nbsp; {label_ht} &nbsp;</td>
   <td class='under'>{v_height}&nbsp;</td>
   <td width='1%' nowrap>&nbsp; {label_wt} &nbsp;</td>
   <td class='under'>{v_weight}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_name} &nbsp;</td>
   <td class='under'>{pt_title} {pt_fname} {pt_mname} {pt_lname}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_age} &nbsp;</td>
   <td class='under'>{pt_age}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_gender} &nbsp;</td>
   <td class='under'>{pt_sex}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_address} &nbsp;</td>
   <td class='under'>{pt_street}, {pt_city} {pt_state}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_postal} &nbsp;</td>
   <td class='under'>{pt_postal_code}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_phone} &nbsp;</td>
   <td class='under'>{pt_phone_home}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_ref_reason} &nbsp;</td>
   <td class='under'>{ref_body}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_diagnosis} &nbsp;</td>
   <td class='under'>{ref_refer_diag}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_ref_class} &nbsp;</td>
   <td class='under'>{ref_refer_risk_level}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_dr_name_sig} &nbsp;</td>
   <td class='under'>{ref_refer_from}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_refer_to} &nbsp;</td>
   <td class='under'>{ref_refer_to} / {to_organization}&nbsp;</td>
  </tr>
 </table>

 <hr />

 <table class="bigtable">
  <tr>
   <td class='mainhead'>
    {header1}
    <span class='subhead'>{label_subhead_patient}</span>
   </td>
   <td style="text-align:right;vertical-align:top;width:10%;white-space:nowrap">
    <table border='1' style="padding:2px;border-spacing:0;border-collapse:collapse">
     <!--
     <tr>
      <td style="white-space:nowrap">{label_clinic_id}</td>
      <td style='width:60pt;white-space:nowrap'>{fac_facility_npi}</td>
     </tr>
     -->
     <tr>
      <td style="white-space:nowrap">{label_client_id}</td>
      <td style="white-space:nowrap">{pt_pubpid}&nbsp;</td>
     </tr>
     <!--
     <tr>
      <td style="white-space:nowrap">{label_control_no}</td>
      <td style="white-space:nowrap">{ref_id}</td>
     </tr>
     -->
     <tr>
      <td style="white-space:nowrap">{label_date}</td>
      <td style="white-space:nowrap;min-width:54pt">{ref_refer_date}&nbsp;</td>
     </tr>
    </table>
   </td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_name} &nbsp;</td>
   <td class='under'>{pt_title} {pt_fname} {pt_mname} {pt_lname}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; Age &nbsp;</td>
   <td class='under'>{pt_age}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_gender} &nbsp;</td>
   <td class='under'>{pt_sex}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_clinic} &nbsp;</td>
   <td class='under'>{to_organization}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_address} &nbsp;</td>
   <td class='under'>{to_street}, {to_city} {to_state}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_postal} &nbsp;</td>
   <td class='under'>{to_zip}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_phone} &nbsp;</td>
   <td class='under'>{to_phone}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_ref_reason} &nbsp;</td>
   <td class='under'>{ref_body}&nbsp;</td>
  </tr>
 </table>

 <br />&nbsp;<br />{label_history_summary}:

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_bp} &nbsp;</td>
   <td class='under'>{v_bps}/{v_bpd}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_ht} &nbsp;</td>
   <td class='under'>{v_height}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_wt} &nbsp;</td>
   <td class='under'>{v_weight}&nbsp;</td>
  </tr>
 </table>

 <p>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_ref_name_sig} &nbsp;</td>
   <td class='under'>{ref_refer_from}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_special_name_sig} &nbsp;</td>
   <td class='under'>{ref_refer_to}&nbsp;</td>
  </tr>
 </table>

</div></div>
<br style="clear:both;" /><!-- kludge to fix bizarre Firefox problem with page breaks -->
<p style='page-break-after: always'></p>
<div class='borderdiv'><div class='paddingdiv'>

 <table class="bigtable">
  <tr>
   <td class='mainhead'>
    {header2}
    <span class='subhead'>{label_subhead_referred}</span>
   </td>
   <td style="text-align:right;vertical-align:top;width:10%;white-space:nowrap">
    <table border='1' style="padding:2px;border-spacing:0;border-collapse:collapse">
     <!--
     <tr>
      <td style="white-space:nowrap">{label_clinic_id}</td>
      <td style='width:60pt;white-space:nowrap'>{fac_facility_npi}</td>
     </tr>
     -->
     <tr>
      <td style="white-space:nowrap">{label_client_id}</td>
      <td style="white-space:nowrap">{pt_pubpid}&nbsp;</td>
     </tr>
     <!--
     <tr>
      <td style="white-space:nowrap">{label_control_no}</td>
      <td style="white-space:nowrap">{ref_id}</td>
     </tr>
     -->
     <tr>
      <td style="white-space:nowrap">{label_date}</td>
      <td style="white-space:nowrap;min-width:54pt">{ref_reply_date}&nbsp;</td>
     </tr>
    </table>
   </td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_name} &nbsp;</td>
   <td class='under'>{pt_title} {pt_fname} {pt_mname} {pt_lname}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_age} &nbsp;</td>
   <td class='under'>{pt_age}&nbsp;</td>
   <td style="width:1%;white-space:nowrap">&nbsp; {label_gender} &nbsp;</td>
   <td class='under'>{pt_sex}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_clinic} &nbsp;</td>
   <td class='under'>{to_organization}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_diagnosis} &nbsp;</td>
   <td class='under'>{ref_reply_init_diag}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_findings} &nbsp;</td>
   <td class='under'>{ref_reply_findings}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_final_diagnosis} &nbsp;</td>
   <td class='under'>{ref_reply_final_diag}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_services_provided} &nbsp;</td>
   <td class='under'>{ref_reply_services}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_recommendations} &nbsp;</td>
   <td class='under'>{ref_reply_recommend}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_scripts_and_referrals} &nbsp;</td>
   <td class='under'>{ref_reply_rx_refer}&nbsp;</td>
  </tr>
 </table>

 <table class='linetable'>
  <tr>
   <td style="width:1%;white-space:nowrap">{label_special_name_sig} &nbsp;</td>
   <td class='under'>{ref_refer_to}&nbsp;</td>
  </tr>
 </table>

</div></div>

<!-- This should really be in the onload handler but that seems to be unreliable and can crash Firefox 3. -->
<script type="text/javascript">
 var win = top.printLogPrint ? top : opener.top;
 win.printLogPrint(window);
</script>

</body>
</html>
